<%-- 
    Document   : updateFormView
    Created on : 2012. 4. 23, 오후 4:24:29
    Author     : jeong
--%>

<%@page import="com.webproject.member.UsersManager"%>
<%@page import="com.webproject.member.model.Users"%>
<%@page import="com.webproject.jsp.common.CommonUtil"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%
        String id = CommonUtil.strChkNull((String) session.getAttribute("ID"),"");
        UsersManager usersManager = UsersManager.getInstance();
        Users users = usersManager.getUsers(id);
%>

<form action="/webproj/member/update.jsp" method="post">
<table width="100%" border="1" cellpadding="1" cellspacing="0">
<tr>
    <td>아이디</td>
    <td><%= users.getUserId() %></td>
</tr>
<tr>
    <td>이름</td>
    <td><input type="text" name="name" 
               value="<%= users.getUserName() %>" size="20"></td>
</tr>
<tr>
    <td>암호</td>
    <td><input type="password" name="password" 
               value="<%= users.getUserPassword() %>" size="10"></td>
</tr>
<tr>
    <td>성별</td>
    <td>
        <select name="sex">
            <%
               if(users.getUserSex()=="남자") {
            %>
            <option value="남자" selected>남자</option>
            <option value="여자">여자</option>
            <%
               } else {
            %>
            <option value="남자">남자</option>
            <option value="여자" selected>여자</option>       
            <% } %>
        </select>
        <input type="text" name="address" 
               value="<%= users.getAddress() %>" size="20"></td>
</tr>
<tr>
    <td>이메일</td>
    <td><input type="text" name="email" 
               value="<%= users.getEmail() %>" size="20"></td>
</tr>
<tr>
    <td>주소</td>
    <td><input type="text" name="address" 
               value="<%= users.getAddress() %>" size="20"></td>
</tr>
<tr>
    <td>전화번호</td>
    <td><input type="text" name="telno" 
               value="<%= users.getTelno() %>" size="20"></td>
</tr>
<tr>
    <td>휴대폰번호</td>
    <td><input type="text" name="cellno" 
               value="<%= users.getCellno() %>" size="20"></td>
</tr>
<tr>
    <td>닉네임명</td>
    <td><input type="text" name="avatar" 
               value="<%= users.getAvatar() %>" size="20"></td>
</tr>
<tr>
    <td colspan="2"><input type="submit" value="정보수정"></td>
</tr>
</table>
</form>